﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace NCS_CS
{
    public partial class FormHtmlRpt : Form
    {
        public FormHtmlRpt()
        {
            InitializeComponent();
            loadhtml();
        }
        void loadhtml()
        {
            string html = "";
            html = html + "<html>";
            html=html+"<body>";
            html=html+"<p>氧氮分析结果</p>";
            int rows = ModMain.getFrmMain().samples.Count;
            
            html=html+"<p>样品名称 C%   S%</p>";
            foreach (NCS.sample s in ModMain.getFrmMain().samples)
            {
                html = html + "<p>"+s.name+" "+s.c.ToString()+" "+s.s.ToString()+"</p>";
            }
            html = html + "</body>";
            html = html + "</html>"; 
            this.textBox1.Text = html;
            //BindingContext bc = new BindingContext();
            //this.webBrowser1.BindingContext = bc;
        }
        private void button1_Click(object sender, EventArgs e)
        {

        }
    }
}
